/*
 * @Author: qianmingtian
 * @Date: 2020-07-13 08:43:29
 * @LastEditors: qianmingtian
 * @LastEditTime: 2020-07-13 10:30:31
 * @FilePath: \qianmingtian.github.io\code\DataStruct\ListTest.java
 */
package DataStruct;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;

class Node {
    int value;
    Node next;

    public Node() {

    }

    public Node(int value) {
        this.value = value;
    }

    public Node(int value, Node next) {
        this.value = value;
        this.next = next;
    }
}

public class ListTest {

    public void add(int value) {
        Node node = new Node(value);


    }

    public static void main(String[] args) {
        HashSet<String> hashSet = new HashSet<>();
        hashSet.add("sad");
        hashSet.add("sad32");
        hashSet.add("sad56");
        hashSet.add("sa1d");
        List<String> list = new ArrayList<>(hashSet);
        Collections.sort(list);
        for(String s: list){
            System.out.println(s);
        }

        System.out.println("---------------hashMap");

        HashMap<Integer,Integer> map = new HashMap<>();
        
        map.put(31, 3);
        map.put(14, 3);
        map.put(41, 3);
        map.put(11, 3);
        map.put(1, 3);

        // List<Integer> listMap = new ArrayList<>(map);

    }
}